#!/bin/sh

if [ $# -lt 1 ]; then
echo "usage: go machine_name"
exit 1
fi

name=$1; shift

if [ $name = im_ctrl -o $name = rf_ctrl1 ]; then
user=yangxin
ip=172.16.83.65
password=yangxin@zhishi
elif [ $name = msgdis -o $name = rf_ctrl2 ]; then
user=yangxin
ip=172.23.24.53
password=yangxin@zhishi
elif [ $name = msgmaster ]; then
user=yangxin
ip=172.23.24.42
password=yangxin@zhishi
elif [ $name = msgslave ]; then
user=yangxin
ip=10.130.70.43
password=yangxin@zhishi
###
### im
###
elif [ $name = imdis ]; then
user=yangxin
ip=172.23.24.52
password=yangxin@zhishi
elif [ $name = rf_ctrl4 ]; then
user=yangxin
ip=172.23.24.39
password=yangxin@zhishi
elif [ $name = rf_ctrl3 -o $name = rrm1 ]; then
user=yangxin
ip=172.23.150.98
password=yangxin@zhishi
###
### tst
###
elif [ $name = tst ]; then
user=yangxin
ip=172.23.150.99 
password=yangxin@zhishi
###
### active user
###
elif [ $name = aum_svr ]; then
user=yangxin
ip=172.27.24.29  
password=yangxin@zhishi
elif [ $name = aum_cli1 ]; then
user=yangxin
ip=172.27.24.15  
password=yangxin@zhishi
elif [ $name = aum_cli2 ]; then
user=yangxin
ip=172.23.151.25
password=yangxin@zhishi
###
### qa front
###
elif [ $name = qa64 ]; then
user=yangxin
ip=172.23.24.64
password=yangxin@zhishi
elif [ $name = qa14 ]; then
user=yangxin
ip=172.27.24.14
password=yangxin@zhishi
elif [ $name = qa50 ]; then
user=wwqa
ip=172.16.196.50
password=wwqa@soso.com
###
### qa storage
###
elif [ $name = qafsm0 ]; then
user=root
ip=172.23.150.43
password=syAng@sosO
elif [ $name = qafss0 ]; then
user=yangxin
ip=172.23.24.73 
password=yangxin@zhishi
elif [ $name = qafstst ]; then
user=yangxin
ip=172.23.24.68 
password=yangxin@zhishi
elif [ $name = qadb ]; then
user=yangxin
ip=172.16.62.43  
password=yangxin@zhishi
elif [ $name = qabig ]; then
user=yangxin
ip=172.23.150.19 
password=yangxin@zhishi
###
### wenwen fs
###
elif [ $name = fsm0old ]; then
user=root
ip=172.16.80.237
password=grAndY@sosO
elif [ $name = fsm0 ]; then
user=root
ip=10.130.26.92
password=syAng@sosO
elif [ $name = fss0old ]; then
user=root
ip=172.16.80.239
password=grAndY@sosO
elif [ $name = fss0 ]; then
user=root
ip=10.130.26.93
password=syAng@sosO
elif [ $name = fsm1old ]; then
user=root
ip=172.23.24.26 
password=grAndY@sosO
elif [ $name = fsm1 ]; then
user=root
ip=10.130.26.94
password=syAng@sosO
elif [ $name = fss1 ]; then
user=root
ip=172.16.211.210
password=grAndY@sosO
elif [ $name = fsm2 ]; then
user=root
ip=172.23.151.23
password=grAndY@sosO
elif [ $name = fss2 ]; then
user=root
ip=172.23.151.24
password=grAndY@sosO
elif [ $name = fsm3 ]; then
user=root
ip=10.128.7.214
password=grAndY@sosO
elif [ $name = fss3 ]; then
user=root
ip=10.128.7.215
password=grAndY@sosO
elif [ $name = fsm4 ]; then
user=root
ip=10.130.26.90
password=syAng@sosO
elif [ $name = fss4 ]; then
user=root
ip=10.130.26.91
password=syAng@sosO
###
### sobar fs
### 
elif [ $name = sobar_fs_m0 ]; then
user=root
ip=172.16.85.27
password=etAng@sosO
elif [ $name = sobar_fs_s0 ]; then
user=root
ip=172.23.24.57
password=etAng@sosO
elif [ $name = sobar_fs_m1 ]; then
user=root
ip=172.23.151.21
password=etAng@sosO
elif [ $name = sobar_fs_s1 ]; then
user=root
ip=172.27.198.10
password=etAng@sosO

### db
### master
elif [ $name = dbm0 ]; then
user=root
ip=172.23.23.123
password=syAng@sosO
elif [ $name = dbm1 ]; then
user=root
ip=172.23.24.32
password=BK@sosO
elif [ $name = dbm2 ]; then
user=root
ip=172.23.24.33
password=aL@sosO
elif [ $name = dbm3 ]; then
user=root
ip=172.23.150.13
password=syAng@sosO
elif [ $name = dbm4 ]; then
user=root
ip=172.23.24.35
password=BK@sosO
elif [ $name = dbm5 ]; then
user=root
ip=172.23.150.10
password=BK@sosO
elif [ $name = dbm6 ]; then
user=root
ip=172.23.150.11
password=BK@sosO
elif [ $name = dbm7 ]; then
user=root
ip=172.23.24.78
password=aL@sosO
elif [ $name = dbm8 ]; then
user=root
ip=172.23.150.48
password=BK@sosO
elif [ $name = dbm9 ]; then
user=root
ip=172.23.150.49
password=BK@sosO

### slave
elif [ $name = dbs0 ]; then
user=root
ip=10.128.7.218
password=syAng@sosO
elif [ $name = dbs1 ]; then
user=root
ip=172.23.23.116
password=syAng@sosO
elif [ $name = dbs2 ]; then
user=root
ip=172.23.24.30
password=aL@sosO
elif [ $name = dbs3 ]; then
user=root
ip=172.23.24.31
password=BK@sosO
elif [ $name = dbs4 ]; then
user=root
ip=172.23.24.34
password=BK@sosO
elif [ $name = dbs5 ]; then
user=root
ip=172.23.150.121
password=DR@sosO
elif [ $name = dbs6 ]; then
user=root
ip=172.23.24.69
password=DR@sosO
elif [ $name = dbs7 ]; then
user=root
ip=172.23.24.74
password=DR@sosO
elif [ $name = dbs8 ]; then
user=root
ip=172.23.150.46
password=BK@sosO
elif [ $name = dbs9 ]; then
user=root
ip=172.23.150.47
password=BK@sosO
# baike
elif [ $name = bcm ]; then
user=yangxin
ip=172.23.24.73
password=yangxin@zhishi
elif [ $name = bcs ]; then
user=yangxin
ip=172.23.24.68
password=yangxin@zhishi
else
echo "unknown name:$name"
exit 1
fi

BIN_NAME=`basename $0.exp`;
${BIN_NAME} ${user} ${ip} ${password}
